<template>
  <div>
    <div class="box" v-for="(item, index) in suggest" :key="index">
      <p class="van-ellipsis" @click="hot(item.name)">
        <van-icon name="search" color="#000" /> {{ item.name }}
      </p>
      <van-divider />
    </div>
  </div>
</template>

<script>
export default {
  name: "VueMusicSearchSuggest",
  props: ["suggest"],
  data() {
    return {};
  },

  mounted() {},

  methods: {
    hot(hot) {
      this.$parent.onSearch(hot);
    },
  },
};
</script>

<style lang="less" scoped>
.box {
  padding: 0 0.9375rem;
  p {
    text-align: left;
    max-width: 17.5rem;
    height: 1.875rem;
    line-height: 1.875rem;
  }
  .van-divider {
    margin: 0.3125rem 0;
    padding: 0;
  }
}
</style>